package com.itheima;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.itheima.service.BookService;

public class AppForName {
    public static void main(String[] args) {
            //加载类路径下的源文件
            ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");

            BookService bookService=(BookService) ctx.getBean("bookService");

            bookService.save();
    }

}
